ref-manual: document KERNEL_SPLIT_MODULES variable
PATCH v2 1/1 ref-manual: document KERNEL_SPLIT_MODULES variable
This variable controls the kernel module spliting.
--- documentation/ref-manual/variables.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
documentation/ref-manual/variables.rst +14 -0
@@ -5359,6 +5359,20 @@ system and gives an overview of their function and contents. the :term:`KERNEL_PATH` variable. Both variables are common variables used by external Makefiles to point to the kernel source directory. + :term:`KERNEL_SPLIT_MODULES` + When inheriting the :ref:`ref-classes-kernel-module-split` class, this + variable controls whether kernel modules are split into separate packages + or bundled into a single package. + + For some use cases, a monolithic kernel module package + :ref:`KERNEL_PACKAGE_NAME` (by default named ``kernel``) that contains + all modules built from the kernel sources may be preferred. Because a + monolithic package can reduce download time and speed up installation. + + By default, this variable is set to ``1``, resulting in one package per + module. Setting it to any other value will generate a single monolithic + package containing all kernel modules. + :term:`KERNEL_SRC` The location of the kernel sources. This variable is set to the value of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module`
Signature · 1 line
2.43.0
Quoted 12 lines · Dixit Parmar via lists.yoctoproject.org
This variable controls the kernel module spliting.
Signed-off-by Dixit Parmar <[email protected]>--- documentation/ref-manual/variables.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+)documentation/ref-manual/variables.rst +0
-0
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5368
Quoted 10 lines
documentation/ref-manual/variables.rst +7
-0@@ -5359,6 +5359,20 @@ system and gives an overview of their function and contents. the :term:`KERNEL_PATH` variable. Both variables are common variables used by external Makefiles to point to the kernel source directory. + :term:`KERNEL_SPLIT_MODULES` + When inheriting the :ref:`ref-classes-kernel-module-split` class, this + variable controls whether kernel modules are split into separate packages + or bundled into a single package. + + For some use cases, a monolithic kernel module package + :ref:`KERNEL_PACKAGE_NAME` (by default named ``kernel``) that contains
This should be :term:KERNEL_PACKAGE_NAME (not :ref:). Otherwise fails to build.
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5370
Quoted 2 lines
documentation/ref-manual/variables.rst +2
-0+ all modules built from the kernel sources may be preferred. Because a + monolithic package can reduce download time and speed up installation.
I think this can be simplified by "...may be preferred to speed up installation". "Download time" is too context specific, probably related to package management on the target.
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5378
Quoted 8 lines
documentation/ref-manual/variables.rst +5
-0+ + By default, this variable is set to ``1``, resulting in one package per + module. Setting it to any other value will generate a single monolithic + package containing all kernel modules. + :term:`KERNEL_SRC` The location of the kernel sources. This variable is set to the value of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module`
Thanks,
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 34 lines · Antonin Godard
Quoted 12 lines · Dixit Parmar via lists.yoctoproject.org
This variable controls the kernel module spliting.
Signed-off-by Dixit Parmar <[email protected]>--- documentation/ref-manual/variables.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+)documentation/ref-manual/variables.rst +0
-0documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5368
Quoted 10 lines
documentation/ref-manual/variables.rst +7
-0@@ -5359,6 +5359,20 @@ system and gives an overview of their function and contents. the :term:`KERNEL_PATH` variable. Both variables are common variables used by external Makefiles to point to the kernel source directory. + :term:`KERNEL_SPLIT_MODULES` + When inheriting the :ref:`ref-classes-kernel-module-split` class, this + variable controls whether kernel modules are split into separate packages + or bundled into a single package. + + For some use cases, a monolithic kernel module package + :ref:`KERNEL_PACKAGE_NAME` (by default named ``kernel``) that containsThis should be :term:
KERNEL_PACKAGE_NAME(not :ref:). Otherwise fails to build.documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5370
Quoted 2 lines
documentation/ref-manual/variables.rst +2
-0+ all modules built from the kernel sources may be preferred. Because a + monolithic package can reduce download time and speed up installation.I think this can be simplified by "...may be preferred to speed up installation". "Download time" is too context specific, probably related to package management on the target.
Quoted 8 lines
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5378
Quoted 8 lines
documentation/ref-manual/variables.rst +5
-0+ + By default, this variable is set to ``1``, resulting in one package per + module. Setting it to any other value will generate a single monolithic + package containing all kernel modules. + :term:`KERNEL_SRC` The location of the kernel sources. This variable is set to the value of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module`
Not sure about the "kernel" package name. After building with KERNEL_SPLIT_MODULES to 0:
$ bitbake-getvar KERNEL_PACKAGE_NAME -r virtual/kernel # # $KERNEL_PACKAGE_NAME [2 operations] # set /build/../work/openembedded-core/meta/conf/documentation.conf:253 # [doc] "Name prefix for kernel packages. Defaults to 'kernel'." # set /build/../work/openembedded-core/meta/classes-recipe/kernel.bbclass:11 # [_defaultval] "kernel" # pre-expansion value: # "kernel" KERNEL_PACKAGE_NAME="kernel"
$ oe-pkgdata-util list-pkgs | grep kernel kernel kernel-base kernel-dbg kernel-dev kernel-image kernel-image-image kernel-modules kernel-vmlinux
$ oe-pkgdata-util list-pkg-files kernel-modules | head -7
kernel-modules:
/lib/modules/6.12.30-yocto-standard/kernel/crypto/af_alg.ko
/lib/modules/6.12.30-yocto-standard/kernel/crypto/algif_aead.ko
/lib/modules/6.12.30-yocto-standard/kernel/crypto/algif_hash.ko
/lib/modules/6.12.30-yocto-standard/kernel/crypto/algif_rng.ko
/lib/modules/6.12.30-yocto-standard/kernel/crypto/algif_skcipher.ko
/lib/modules/6.12.30-yocto-standard/kernel/crypto/blowfish_common.ko
...So it seems to me that the name of the package is "kernel-modules", not "kernel"?
Another side question: in my experience I never had to set KERNEL_SPLIT_MODULES to be able to install *all* kernel modules. Whatever the value of KERNEL_SPLIT_MODULES, installing the package "kernel-modules" would just install the modules. So what is the difference after setting this variable?
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Will fix the ref->term typo and the take your suggestion on rewording.
There seem to be confusion related to the kernel package name, however I feel it was additional information. I shall remove the mention of the kernel package name (keep the variable reference only) for simplicity in next version.
Another side question: in my experience I never had to set KERNEL_SPLIT_MODULES to be able to install *all* kernel modules. Whatever the value of KERNEL_SPLIT_MODULES, installing the package "kernel-modules" would just install the modules. So what is the difference after setting this variable?
Yes, you would be able to install "all" the kernel-modules without bothering about KERNEL_SPLIT_MODULES. The issue is having autoload .conf file being installed or not when KERNEL_MODULE_AUTOLOAD is having your modules listed to be autoloader. When KERNEL_SPLIT_MODULES = 0 the .conf files for driver autoload and probeconf is not getting generated.
Quoted 6 lines · Dixit Parmar via lists.yoctoproject.org
Will fix the
ref->termtypo and the take your suggestion on rewording.There seem to be confusion related to the kernel package name, however I feel it was additional information. I shall remove the mention of the kernel package name (keep the variable reference only) for simplicity in next version.
Looking forward to it!
Quoted 5 lines
Yes, you would be able to install "all" the kernel-modules without bothering about
KERNEL_SPLIT_MODULES. The issue is having autoload .conf file being installed or not whenKERNEL_MODULE_AUTOLOADis having your modules listed to be autoloader. WhenKERNEL_SPLIT_MODULES= 0 the .conf files for driver autoload and probeconf is not getting generated.
This sounds like a bug to me, no? Why would someone expect setting KERNEL_SPLIT_MODULES to 0 have the autoload files missing?
I ran a some tests. So when I set KERNEL_SPLIT_MODULES to 1, and KERNEL_MODULE_AUTOLOAD to "xt_limit", a kernel-module-xt-limit.ipk package is generated like so:
├── etc
│ └── modules-load.d
│ └── xt_limit.conf
└── lib
└── modules
└── 6.12.30-yocto-standard
└── kernel
└── net
└── netfilter
└── xt_limit.koWhen KERNEL_SPLIT_MODULES is set to 0, only one kernel-modules.ipk package is generated, and does _not_ contain xt_limit.conf, but only xt_limit.ko. To me this sounds like a bug, what do you think?
I would _not_ describe that behavior in the documentation for the KERNEL_SPLIT_MODULES variables.
The fact that "kernel-modules" is still available when KERNEL_SPLIT_MODULES = 1 is simply because a "fake" kernel-modules.ipk package is generated, and depends on the other kernel-module-* packages - so you can ignore my remark in my previous message.
Thanks,
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 42 lines · Antonin Godard
Quoted 7 lines · Dixit Parmar via lists.yoctoproject.org
Will fix the
ref->termtypo and the take your suggestion on rewording.There seem to be confusion related to the kernel package name, however I feel
it was additional information. I shall remove the mention of the kernel package name (keep the variable reference only) for simplicity in next version.Looking forward to it!
Quoted 7 lines
Yes, you would be able to install "all" the kernel-modules without bothering
aboutKERNEL_SPLIT_MODULES. The issue is having autoload .conf file being installed or not whenKERNEL_MODULE_AUTOLOADis having your modules listed to
be autoloader. WhenKERNEL_SPLIT_MODULES= 0 the .conf files for driver autoload and probeconf is not getting generated.This sounds like a bug to me, no? Why would someone expect setting
KERNEL_SPLIT_MODULESto 0 have the autoload files missing?I ran a some tests. So when I set
KERNEL_SPLIT_MODULESto 1, andKERNEL_MODULE_AUTOLOADto "xt_limit", a kernel-module-xt-limit.ipk package is
generated like so:├── etc │ └── modules-load.d │ └── xt_limit.conf └── lib └── modules └── 6.12.30-yocto-standard └── kernel └── net └── netfilter └── xt_limit.ko
Quoted 5 lines
When
KERNEL_SPLIT_MODULESis set to 0, only one kernel-modules.ipk package is
generated, and does _not_ contain xt_limit.conf, but only xt_limit.ko. To me
this sounds like a bug, what do you think?
Exactly, that's the issue reported https://bugzilla.yoctoproject.org/show_bug.cgi?id=15145 ( https://bugzilla.yoctoproject.org/show_bug.cgi?id=15145 ) and I am fixing it here with this solution https://lists.openembedded.org/g/openembedded-core/message/218290.
Quoted 3 lines
I would _not_ describe that behavior in the documentation for the
KERNEL_SPLIT_MODULESvariables.
True, that's why the documentation does not mention anything about the conf files.
Quoted 7 lines
The fact that "kernel-modules" is still available when
KERNEL_SPLIT_MODULES= 1
is simply because a "fake" kernel-modules.ipk package is generated, and depends
on the other kernel-module-* packages - so you can ignore my remark in my previous message.
Which remark exactly??
Quoted 8 lines
Thanks,
Antonin--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Quoted 59 lines · Dixit Parmar via lists.yoctoproject.org
Quoted 42 lines · Antonin Godard
Quoted 7 lines · Dixit Parmar via lists.yoctoproject.org
Will fix the
ref->termtypo and the take your suggestion on rewording.There seem to be confusion related to the kernel package name, however I feel
it was additional information. I shall remove the mention of the kernel package name (keep the variable reference only) for simplicity in next version.Looking forward to it!
Quoted 7 lines
Yes, you would be able to install "all" the kernel-modules without bothering
aboutKERNEL_SPLIT_MODULES. The issue is having autoload .conf file being installed or not whenKERNEL_MODULE_AUTOLOADis having your modules listed to
be autoloader. WhenKERNEL_SPLIT_MODULES= 0 the .conf files for driver autoload and probeconf is not getting generated.This sounds like a bug to me, no? Why would someone expect setting
KERNEL_SPLIT_MODULESto 0 have the autoload files missing?I ran a some tests. So when I set
KERNEL_SPLIT_MODULESto 1, andKERNEL_MODULE_AUTOLOADto "xt_limit", a kernel-module-xt-limit.ipk package is
generated like so:├── etc │ └── modules-load.d │ └── xt_limit.conf └── lib └── modules └── 6.12.30-yocto-standard └── kernel └── net └── netfilter └── xt_limit.koQuoted 5 lines
When
KERNEL_SPLIT_MODULESis set to 0, only one kernel-modules.ipk package is
generated, and does _not_ contain xt_limit.conf, but only xt_limit.ko. To me
this sounds like a bug, what do you think?Exactly, that's the issue reported https://bugzilla.yoctoproject.org/show_bug.cgi?id=15145 ( https://bugzilla.yoctoproject.org/show_bug.cgi?id=15145 ) and I am fixing it here with this solution https://lists.openembedded.org/g/openembedded-core/message/218290.
Quoted 3 lines
I would _not_ describe that behavior in the documentation for the
KERNEL_SPLIT_MODULESvariables.True, that's why the documentation does not mention anything about the conf files.
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
The fact that "kernel-modules" is still available when
KERNEL_SPLIT_MODULES= 1
is simply because a "fake" kernel-modules.ipk package is generated, and depends
on the other kernel-module-* packages - so you can ignore my remark in my previous message.Which remark exactly??
About the possibility to install "kernel-modules" both when KERNEL_SPLIT_MODULES is 0 or 1. I guess it doesn't hurt to add a note about that at the end of the definition:
"""
.. note::
If :term:KERNEL_SPLIT_MODULES is set to 0, it is still possible to install all kernel modules at once by adding ``kernel-modules`` to :term:IMAGE_INSTALL. The way it works is that a placeholder "kernel-modules" package will be created and will depend on every other individual kernel module packages.
"""
So there's no confusion. What do you think?
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 98 lines · Antonin Godard
Quoted 68 lines · Dixit Parmar via lists.yoctoproject.org
Quoted 45 lines · Antonin Godard
Quoted 7 lines · Dixit Parmar via lists.yoctoproject.org
Will fix the
ref->termtypo and the take your suggestion on rewording.There seem to be confusion related to the kernel package name, however I feel
it was additional information. I shall remove the mention of the kernel package name (keep the variable reference only) for simplicity in next version.Looking forward to it!
Quoted 8 lines
Yes, you would be able to install "all" the kernel-modules without bothering
aboutKERNEL_SPLIT_MODULES. The issue is having autoload .conf file being installed or not whenKERNEL_MODULE_AUTOLOADis having your modules listedto
be autoloader. WhenKERNEL_SPLIT_MODULES= 0 the .conf files for driver autoload and probeconf is not getting generated.This sounds like a bug to me, no? Why would someone expect setting
KERNEL_SPLIT_MODULESto 0 have the autoload files missing?I ran a some tests. So when I set
KERNEL_SPLIT_MODULESto 1, andKERNEL_MODULE_AUTOLOADto "xt_limit", a kernel-module-xt-limit.ipk packageis
generated like so:├── etc │ └── modules-load.d │ └── xt_limit.conf └── lib └── modules └── 6.12.30-yocto-standard └── kernel └── net └── netfilter └── xt_limit.koQuoted 6 lines
When
KERNEL_SPLIT_MODULESis set to 0, only one kernel-modules.ipk packageis
generated, and does _not_ contain xt_limit.conf, but only xt_limit.ko. To me
this sounds like a bug, what do you think?Exactly, that's the issue reported https://bugzilla.yoctoproject.org/show_bug.cgi?id=15145
( https://bugzilla.yoctoproject.org/show_bug.cgi?id=15145 ) and I am fixing it here with this solution https://lists.openembedded.org/g/openembedded-core/message/218290
.Quoted 2 lines
I would _not_ describe that behavior in the documentation for the
KERNEL_SPLIT_MODULESvariables.True, that's why the documentation does not mention anything about the conf files.
Quoted 8 lines
Quoted 6 lines
The fact that "kernel-modules" is still available when
KERNEL_SPLIT_MODULES= 1
is simply because a "fake" kernel-modules.ipk package is generated, and depends
on the other kernel-module-* packages - so you can ignore my remark in my previous message.Which remark exactly??
About the possibility to install "kernel-modules" both when
KERNEL_SPLIT_MODULES
is 0 or 1. I guess it doesn't hurt to add a note about that at the end of the
definition:"""
.. note::If :term:
KERNEL_SPLIT_MODULESis set to 0, it is still possible to install
all kernel modules at once by adding ``kernel-modules`` to :term:IMAGE_INSTALL. The way it works is that a placeholder "kernel-modules" package will be created and will depend on every other individual kernel module packages.
"""
Quoted 1 line
So there's no confusion. What do you think?
That sounds good to me. I will append this note. Thanks for suggestion.
Quoted 8 lines
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Antonin Godard
AppliedQuoted 3 lines · Dixit Parmar
This variable controls the kernel module spliting.
Applied, thanks!
[1/1] ref-manual: document KERNEL_SPLIT_MODULES variable
commit: 198179d9c6231b5934d4fb6ede716d1dcb1442bb
Best regards,
Signature · 1 line
Antonin Godard <[email protected]>